import React, {useState} from "react";
import {NavLink} from "react-router-dom";

const App: React.FC = () => {
    const fullPath=window.location.href.split("?url=")[1]
    console.log("fullPath:",fullPath)
    const [realPath,setRealPath]=useState(fullPath.split("/#")[1])
    // const realPath=fullPath.split("/#")[1]
    if(!realPath)
        setRealPath(fullPath)
    return (
        <>
            <p>you have input a wrong url,maybe you mean</p>
            <NavLink to={realPath}>{window.location.origin}/#{realPath}</NavLink>
        </>
    )
}
export default App;
